package com.hdax.dmw.common.exceptions;

import com.hdax.dmw.common.utils.ServiceResultEnum;

//当前工程所有异常的父类异常
public class DmException extends RuntimeException{

    public DmException(ServiceResultEnum code){
        this(code.getResult());
    }

    public DmException(String message) {
        super(message);
    }
    public DmException(String errorCode, String message){
        super(message);
        this.errorCode = errorCode;
    }

    protected String errorCode;

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }
}
